-- GENERATED SPELL FOR [Nether Dragon] --


function spell0_20332(pUnit, Event) --@Intangible Presence,n/a--
pUnit:FullCastSpellOnTarget(36513,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20332', 8342, 1)
end

function spell1_20332(pUnit, Event) --@Netherbreath,n/a--
pUnit:FullCastSpellOnTarget(36631,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20332', 5500, 1)
end

function Sorts_20332(pUnit, Event)
local choix_sorts_20332 = math.random(0, 1)
if choix_sorts_20332 == 0 then
pUnit:RegisterEvent('spell0_20332', 1, 1)
end
if choix_sorts_20332 == 1 then
pUnit:RegisterEvent('spell1_20332', 1, 1)
end
end

function mob20332_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20332', math.random(1500, 3000), 1)
end

function mob20332_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20332_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20332_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20332, 1, 'mob20332_Action')
RegisterUnitEvent(20332, 2, 'mob20332_Leave')
RegisterUnitEvent(20332, 3, 'mob20332_Kill')
RegisterUnitEvent(20332, 4, 'mob20332_Die')
